<template>
  <div>
    <header>
      <h1>大数据可视化--vue3.0与echarts</h1>
    </header>
  </div>

  <!-- 大容器 -->
  <section class="container">
    <!-- 左容器 -->
    <section class="itemLeft">
      <itemPage>
        <itemOne />
      </itemPage>
      <itemPage>
        <itemTwo />
      </itemPage>
    </section>
    <!-- 中容器 -->
    <section class="itemCenter">
      <mapPage/>
    </section>
    <!-- 右容器 -->
    <section class="itemRight">
      <itemPage>
        <itemThree />
      </itemPage>
      <itemPage>
        <itemFour />
      </itemPage>
    </section>
  </section>
</template>

<script>
import itemPage from "@/components/itemPage";
import itemOne from "@/components/itemOne";
import itemTwo from "@/components/itemTwo";
import itemThree from "@/components/itemThree";
import itemFour from "@/components/itemFour";
import mapPage from '@/components/mapPage'

import{inject} from "vue"
export default {
  components: { itemPage, itemOne, itemTwo, itemThree, itemFour,mapPage },
  setup(){
    let $echarts = inject("echarts")
    let $http = inject("axios")
    console.log($echarts)
    console.log($http)
  }
};
</script>

<style lang="less">
header {
  width: 100%;
  height: 1rem;
  background-color: rgba(0, 0, 255, 0.2);
  // display: flex;
  h1 {
    font-size: 0.375rem;
    color: #fff;
    text-align: center;
    line-height: 1rem;
    // margin: auto;
  }
}

// 大容器的样式
.container {
  // 最大最小的宽度
  min-width: 1200px;
  max-width: 2048px;
  margin: 0 auto;
  padding: 0.125rem 0.125rem 0;
  // background-color: gray;
  display: flex;
  // 设置左右在页面的份数
  .itemLeft,
  .itemRight {
    flex: 3;
  }
  .itemCenter {
    flex: 5;
    height: 10.5rem;
    border: 1px solid blue;
    padding: 0.125rem;
    margin: 0.25rem;
  }
}
</style>